/*
 * @Descripttion: 描述
 * @Author: 刘黎
 * @Date: 2024-07-03 13:33:39
 * @LastEditors: 刘黎
 * @LastEditTime: 2024-08-19 19:31:46
 */

const children = [
  {//主页面
    path: '/homePage',
    name: 'homePage',
    component: () => import( /* webpackChunkName: "homePage" */ '../views/home/homePage.vue'),
    meta: { requiresAuth: true }
  },
   {// 参考页面
    path: '/demo',
    name: 'demo',
    component: () => import( /* webpackChunkName: "homePage" */ '../views/demo/demo.vue'),
    meta: { requiresAuth: true }
  },
  {//分类管理
    path: '/classification',
    name: 'classification',
    component: () => import( /* webpackChunkName: "classification" */ '../views/classification/index.vue'),
    meta: { requiresAuth: true }
  },
  {//商品管理
    path: '/goodsManage',
    name: 'goodsManage',
    component: () => import( /* webpackChunkName: "goodsManage" */ '../views/goodsManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {//内容管理
    path: '/contentManage',
    name: 'contentManage',
    component: () => import( /* webpackChunkName: "contentManage" */ '../views/contentManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {//组织管理
    path: '/organizationManage',
    name: 'organizationManage',
    component: () => import( /* webpackChunkName: "organizationManage" */ '../views/organizationManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {//角色管理
    path: '/roleManage',
    name: 'roleManage',
    component: () => import( /* webpackChunkName: "roleManage" */ '../views/roleManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {//菜单管理
    path: '/menuManage',
    name: 'menuManage',
    component: () => import( /* webpackChunkName: "menuManage" */ '../views/menuManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {// 经销商管理
    path: '/dealerManage',
    name: 'dealerManage',
    component: () => import( /* webpackChunkName: "dealerManage" */ '../views/dealerManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {// 订单管理
    path: '/orderManage',
    name: 'orderManage',
    component: () => import( /* webpackChunkName: "orderManage" */ '../views/orderManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {// 物流管理
    path: '/orderManage/logistics',
    name: 'orderManageLogistics',
    component: () => import( /* webpackChunkName: "orderManage" */ '../views/orderManage/logistics.vue'),
    meta: { requiresAuth: true }
  },
  {// 公告管理
    path: '/noticeManage',
    name: 'noticeManage',
    component: () => import( /* webpackChunkName: "noticeManage" */ '../views/noticeManage/index.vue'),
    meta: { requiresAuth: true }
  },
  {// 直播管理
    path: '/outsideManage',
    name: 'outsideManage',
    component: () => import( /* webpackChunkName: "outsideManage" */ '../views/outsideManage/index.vue'),
    meta: { requiresAuth: true }
  }
]


export const routers = [
  {
    path: '/',
    redirect: '/index',
    hidden: true
  },
  {
    path: '/index',
    name: 'index',
    redirect: '/homePage',
    children: children,
    component: () =>
      import( /* webpackChunkName: "login" */ '../views/index.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( /* webpackChunkName: "login" */ '../views/login/index.vue'),
    meta: { requiresAuth: false }
  },
  // {
  //   path: '/index',
  //   name: 'index',
  //   redirect: '/homePage',
  //   children: children,
  //   component: () => import( /* webpackChunkName: "login" */ '../views/index.vue')
  // },
]
